
#import "wooddoc.h"

@implementation WoodDoc

- (BOOL)needsSaving
{
    return dirty;
}

- (BOOL)isEmpty
{
    return empty;
}

- (BOOL)hasSavedDocument
{
	return haveSavedDocument;
}

- setEmpty:(BOOL)flag
{
    empty = flag;
    return self;
}

- dirty:(BOOL)flag
{
    dirty = flag;
	[window setDocEdited:flag];
    return self;
}

- setSavedDocument:(BOOL)flag
{
    haveSavedDocument = flag;
    return self;
}

- printInfo
{
    return printInfo;
}

- window
{
	return window;
}

- (Properties *)defaultProps
{
	return &defaultProps;
}

- textDidChange:sender
{
	if(sender == [textView docView] && textViewSaved)
		textViewSaved  = NO;
	return self;
}

- (int)tag
{
	return tag;
}

@end



